import 'dart:ui';
import 'record_day_page.dart';
import 'package:flutter/material.dart';
import 'package:note_life/color.dart';

class CloudNoteCreateClassifyCheck extends StatefulWidget {
  @override
  createState() => _CloudNoteCreateClassifyCheck();
}

class _CloudNoteCreateClassifyCheck
    extends State<CloudNoteCreateClassifyCheck> {
  String headerImgPath = "";

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("云记"),
        elevation: 0.0,
      ),
      body: Column(
        children: <Widget>[
          Divider(
            color: Colors.transparent,
          ),
          _createBodyView("images/day_note_icon.png", "简记", "record_day",
              AppColor.BLUE_COLOR, () {
            Navigator.of(context)
                .push(MaterialPageRoute(builder: (context) => RecordDay()));
          }),
          Container(
            margin: EdgeInsets.only(left: 15.0, right: 15.0),
            child: Divider(
              color: AppColor.DIVIDER_COLOR,
            ),
          ),
          _createBodyView(
              "images/remind_menu.png", "提醒","remind", Color(0XFF00A896), () {}),
          Container(
            margin: EdgeInsets.only(left: 15.0, right: 15.0),
            child: Divider(
              color: AppColor.DIVIDER_COLOR,
            ),
          ),
          _createBodyView(
              "images/calendar_menu.png", "打卡","sign", Color(0XFF02C39A), () {}),
          Divider(
            color: Colors.transparent,
          ),
        ],
      ),
    );
  }

  Widget _createBodyView(String s, String t, String tag, Color colorData,
      GestureTapCallback param2) {
    return Expanded(
      child: InkWell(
        child: Container(
          child: Column(
            children: <Widget>[
              Hero(
                  tag: tag,
                  child: ImageIcon(
                    AssetImage(s),
                    color: colorData,
                    size: 60.0,
                  )),
              Divider(
                color: Colors.transparent,
              ),
              Text(
                t,
                style: TextStyle(
                    color: colorData,
                    fontSize: 18.0,
                    fontWeight: FontWeight.bold),
              )
            ],
            mainAxisAlignment: MainAxisAlignment.center,
          ),
        ),
        onTap: param2,
      ),
      flex: 1,
    );
  }
}
